//
//  User.swift
//  Weibo10
//
//  Created by mac on 16/8/15.
//  Copyright © 2016年 itheima. All rights reserved.
//

import UIKit

class User: NSObject {

    /**
    *  模型属性
    */
    
    // 用户ID
    var id: Int = 0
    // 用户昵称
    var screen_name: String?
    // 用户头像地址
    var profile_image_url: String?
    // 认证类型
    var verified_type: Int = 0
    // 会员等级
    var mbrank: Int = 0
    
    /**
    *  字典转模型的方法
    */
    init(dict: [String: AnyObject]) {
    
        super.init()
        setValuesForKeysWithDictionary(dict)
    }
    
    override func setValue(value: AnyObject?, forUndefinedKey key: String) {
    }
    
    override var description: String {
        let keys = ["id", "screen_name", "profile_image_url", "verified_type", "mbrank"]
        
        return dictionaryWithValuesForKeys(keys).description
    }
}
